home *** CD-ROM | disk | FTP | other *** search
- Path: news.scsn.net!usenet
- From: Michael <mdorsey@scsn.net>
- Newsgroups: comp.lang.c
- Subject: Problem with Watcom C++ 10.5
- Date: Sun, 10 Mar 1996 00:38:19 -0500
- Organization: South Carolina SuperNet, Inc.
- Message-ID: <31426ACB.6AA1@scsn.net>
- NNTP-Posting-Host: cola144.scsn.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- I'm having a rather strange problem with Watcom C. When using functions
- that output to stdout (ie printf()), it is not flushing to the screen
- until a newline is sent. For example:
-
- void main(void)
- {
- printf("Hit Y for yes, N for no: ");
- yn();
- }
-
-
- yn() gets the key stroke and prints yes or no. The problem is that the
- statement will not be printed until the newline from the answer is sent.
- Kind of hard to answer a question if you can't see it. I can get around
- it by flushing stdout after printf(), but I was kind of hoping there was
- some type of variable I could set to turn off buffering of stdout.
-
- Thanks for any help,
- Michael
-